//
//  ChannelLabel.m
//  
//
//  Created by admin on 17/2/28.
//  Copyright © 2017年 admin. All rights reserved.
//

#import "ChannelLabel.h"

@implementation ChannelLabel

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        // 字号
        self.font = [UIFont systemFontOfSize:14.0];
        // 文字居中
        self.textAlignment = NSTextAlignmentCenter;
    }
    return self;
}
- (void)setScale:(CGFloat)scale {
    _scale = scale;
    if (scale > 0.5) {
        self.textColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1.0];
    } else {
        self.textColor = RGBColor(51, 51, 51);
    }
    // 文字颜色渐变
//    self.textColor = [UIColor colorWithRed:scale green:0 blue:0 alpha:1.0];
}
@end
